package com.sxjh.entity.bo;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

// 粗笨查询对象
@Data
public class MonthlyBalanceBo {

    private Integer id;
    /*公司id*/
    private Integer supplierId;
    /*公司名称*/
    private String companyName;
    /*余额日期*/
    private String balanceDate;
    /*期初余额*/
    private BigDecimal openingBalance;
    /*期末余额*/
    private BigDecimal endingBalance;
    /*货款*/
    private BigDecimal payment;
    /*入账单*/
    private BigDecimal billing;
    /*月末入账单*/
    private BigDecimal endMonthBilling;
    /*实时额度*/
    private BigDecimal customerCredit;
    /*创建时间*/
    private LocalDateTime createdTime;

    public BigDecimal getOpeningBalance() {
        if ("".equals(openingBalance) || openingBalance == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return openingBalance;
    }

    public BigDecimal getEndingBalance() {
        if ("".equals(endingBalance) || endingBalance == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return endingBalance;
    }

    public BigDecimal getPayment() {
        if ("".equals(payment) || payment == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return payment;
    }

    public BigDecimal getBilling() {
        if ("".equals(billing) || billing == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return billing;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public void setBalanceDate(String balanceDate) {
        this.balanceDate = balanceDate;
    }

    public void setOpeningBalance(BigDecimal openingBalance) {
        this.openingBalance = openingBalance;
    }

    public void setEndingBalance(BigDecimal endingBalance) {
        this.endingBalance = endingBalance;
    }

    public void setPayment(BigDecimal payment) {
        this.payment = payment;
    }

    public void setBilling(BigDecimal billing) {
        this.billing = billing;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public BigDecimal getEndMonthBilling() {
        if ("".equals(endMonthBilling) || endMonthBilling == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return endMonthBilling;
    }

    public BigDecimal getCustomerCredit() {
        if ("".equals(customerCredit) || customerCredit == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return customerCredit;
    }
}
